package com.question.service.impl;

import java.util.List;

import com.question.dao.AcademyDao;
import com.question.dao.daoFactory.DaoFactory;
import com.question.domain.Academy;
import com.question.domain.Student;
import com.question.service.AcademyService;

public class AcademyServiceImpl implements AcademyService{

	private AcademyDao academyDao = DaoFactory.getInstance().getAcademyDao();
	
	@Override
	public List<Academy> getAcademyRank(Student student) {
		academyDao.reRank(student);
		return academyDao.getAcademyRank();
	}

	
	public List<Academy> getAcademyRank() {
		return academyDao.getAcademyRank();
	}


	@Override
	public void reRank(Student student) {
		// TODO Auto-generated method stub
		academyDao.reRank(student);
	}
	
	/*public static void main(String[] args) {
		AcademyServiceImpl a = new AcademyServiceImpl();
		ArrayList<Academy> list = (ArrayList<Academy>) a.getAcademyRank(new Student());
		for(int i=0;i<list.size();i++){
			System.out.println(list.get(i));
		}
	} */
}
